package test4_11.demo03;

import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.io.FileInputStream;
import java.io.FileOutputStream;

public class Homework21_8 {
    public static void main(String[] args) throws Exception{
        //使用DataOutputStream向文件中输出int,double,String类型的数据
        DataOutputStream dos = new DataOutputStream(new FileOutputStream("D://a.txt"));
        dos.write(1);
        dos.writeDouble(1.1);
        dos.writeUTF("hello");

        dos.flush();
        dos.close();
    }
}
